<template>
	<div class="edit-form">
		<van-field
		  :label="label"
			readonly
			:value="value"
			center
			input-align="right"
		>
			<template #right-icon>
				<slot name="avatar" />
			</template>
		</van-field>
	</div>
</template>

<script>
	export default {
		props: {
			label: {
				type: String,
				default: ''
			},
			value: {
				type: String | Number,
				default: ''
			}
		},
		methods: {
		}
	}
</script>

<style lang="scss" scoped>
	.edit-form{
		border-bottom: 1px solid #eee;
		/deep/ .van-field{
			padding: 10px 12px;
			.van-field__control{
				color: #999;
			}
		}
		/deep/ .avatar{
			position: relative;
			width: 46px;
			height: 46px;
			img{
				width: 46px;
				height: 46px;
				border-radius: 23px;
			}
			.van-uploader{
				position: absolute;
				top: 0;
				left: 0;
				opacity: 0;
				.van-uploader__upload{
					width: 46px;
					height: 46px;
					margin: 0;
				}
			}
		}
	}
</style>